package com.aigis.big4.tmp.javase.thread.queue;

public class Producer implements Runnable{
    private PublicBox box;

    public Producer(PublicBox box) {
        this.box = box;
    }

    @Override
    public void run(){

        for (int j=0;j<100;j++){
            try{
                Thread.sleep(10);
            }catch(InterruptedException e){
               e.printStackTrace();
            }
            //生产一个
            box.increase();
        }
    }
}
